package com.sumainfor.pc.epc.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.epc.feign.Zfeign.ZpcMktFeign;
import com.sumainfor.pc.epc.service.HoHpbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/housekeeper/HoDecorateHpb")
public class HoHpbController implements Serializable{

    @Autowired
    private HoHpbService hoService;
    @Autowired
    private ZpcMktFeign zpcMktFeign;
    /**
     *查询某个房源的土建验房项
     */
    @GetMapping("/getHoDecorateHpbList")
    public JsonResult getHoDecorateHpbList(@RequestParam Map<String, Object> params) {
        JsonResult result=new JsonResult();
        List<Map<String,Object>> list=hoService.getHoHpbList(params);
        if (list!=null){
            result.put(list);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
    /**
     *修改某个房源的土建验房项
     */
    @PostMapping("/updateHoHpb")
    public JsonResult updateHoHpb(@RequestBody Map<String, Object> params) {
        return hoService.updateHoHpb(params);
    }
}
